package com.jgy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;

import java.io.Serializable;

/**
 * 
 * @TableName permission
 */
@TableName(value ="permission")
@Data
public class Permission implements GrantedAuthority , Serializable {

    public Permission(Integer id, String name, String path, String comment, String icon) {
        this.id = id;
        this.name = name;
        this.path = path;
        this.comment = comment;
        this.icon = icon;
    }

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 资源路径
     */
    @TableField(value = "path")
    private String path;

    /**
     * 备注
     */
    @TableField(value = "comment")
    private String comment;

    /**
     * 图标
     */
    @TableField(value = "icon")
    private String icon;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public String getAuthority() {
     return null;
    }
}